package com.example.analysis.utils;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Response1<T> {
    private int code;    //成功与否
    private String message;     //提示信息
    private T data;             //返回数据

    // 构造函数
    public Response1() {}

    public Response1(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Response1(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResponseMessage{" +
                "success=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
